﻿using MyAlbum.Services;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MyAlbum.Data;
using MyAlbum.Model;
using BlogML.Xml;
using System;
using System.Collections.Generic;

namespace UnitTests
{
    
    
    /// <summary>
    ///This is a test class for BlogServiceTest and is intended
    ///to contain all BlogServiceTest Unit Tests
    ///</summary>
    [TestClass()]
    public class BlogServiceTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion

       
        /// <summary>
        ///A test for UpdatePost
        ///</summary>
        [TestMethod()]
        public void UpdatePostTest()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            BlogMLPost post = null; // TODO: Initialize to an appropriate value
            MyAlbum.Utility.IValidationSummary validationSummary = null; // TODO: Initialize to an appropriate value
            MyAlbum.Utility.IValidationSummary validationSummaryExpected = null; // TODO: Initialize to an appropriate value
            target.UpdatePost(post, validationSummary);
            Assert.AreEqual(validationSummaryExpected, validationSummary);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for UpdateComment
        ///</summary>
        [TestMethod()]
        public void UpdateCommentTest()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            string postId = string.Empty; // TODO: Initialize to an appropriate value
            BlogMLComment comment = null; // TODO: Initialize to an appropriate value
            target.UpdateComment(postId, comment);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for GetPosts
        ///</summary>
        [TestMethod()]
        public void GetPostsTest2()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            int pageIndex = 0; // TODO: Initialize to an appropriate value
            int pageSize = 0; // TODO: Initialize to an appropriate value
            Nullable<DateTime> sinceDate = new Nullable<DateTime>(); // TODO: Initialize to an appropriate value
            IEnumerable<BlogMLPost> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<BlogMLPost> actual;
            actual = target.GetPosts(pageIndex, pageSize, sinceDate);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetPosts
        ///</summary>
        [TestMethod()]
        public void GetPostsTest1()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            BlogMLCategory tags = null; // TODO: Initialize to an appropriate value
            Nullable<DateTime> sinceDate = new Nullable<DateTime>(); // TODO: Initialize to an appropriate value
            int maxCount = 0; // TODO: Initialize to an appropriate value
            IEnumerable<BlogMLPost> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<BlogMLPost> actual;
            actual = target.GetPosts(tags, sinceDate, maxCount);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetPosts
        ///</summary>
        [TestMethod()]
        public void GetPostsTest()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            string searchFilter = string.Empty; // TODO: Initialize to an appropriate value
            Nullable<DateTime> sinceDate = new Nullable<DateTime>(); // TODO: Initialize to an appropriate value
            int maxCount = 0; // TODO: Initialize to an appropriate value
            IEnumerable<BlogMLPost> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<BlogMLPost> actual;
            actual = target.GetPosts(searchFilter, sinceDate, maxCount);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetPost
        ///</summary>
        [TestMethod()]
        public void GetPostTest()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            string postId = string.Empty; // TODO: Initialize to an appropriate value
            BlogMLPost expected = null; // TODO: Initialize to an appropriate value
            BlogMLPost actual;
            actual = target.GetPost(postId);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for DeletePost
        ///</summary>
        [TestMethod()]
        public void DeletePostTest()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            string postId = string.Empty; // TODO: Initialize to an appropriate value
            target.DeletePost(postId);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for DeleteComment
        ///</summary>
        [TestMethod()]
        public void DeleteCommentTest()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            string postId = string.Empty; // TODO: Initialize to an appropriate value
            string commentId = string.Empty; // TODO: Initialize to an appropriate value
            target.DeleteComment(postId, commentId);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for AddPost
        ///</summary>
        [TestMethod()]
        public void AddPostTest()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            BlogMLPost post = null; // TODO: Initialize to an appropriate value
            Uri host = null; // TODO: Initialize to an appropriate value
            MyAlbum.Utility.IValidationSummary validationSummary = null; // TODO: Initialize to an appropriate value
            MyAlbum.Utility.IValidationSummary validationSummaryExpected = null; // TODO: Initialize to an appropriate value
            target.AddPost(post, host, validationSummary);
            Assert.AreEqual(validationSummaryExpected, validationSummary);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for AddComment
        ///</summary>
        [TestMethod()]
        public void AddCommentTest()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user); // TODO: Initialize to an appropriate value
            string postId = string.Empty; // TODO: Initialize to an appropriate value
            BlogMLComment comment = null; // TODO: Initialize to an appropriate value
            target.AddComment(postId, comment);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for BlogService Constructor
        ///</summary>
        [TestMethod()]
        public void BlogServiceConstructorTest()
        {
            IBlogRepository blogRepository = null; // TODO: Initialize to an appropriate value
            IUser user = null; // TODO: Initialize to an appropriate value
            BlogService target = new BlogService(blogRepository, user);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }
    }
}
